package com.AAA.service.Impl.sds;

import com.AAA.entity.mht.TMhtRecordDedtail;
import com.AAA.entity.sds.TSdsRecordDedtail;
import com.AAA.service.sds.TSdsRecordDedtailService;
import com.AAA.dao.sds.TSdsRecordDedtailMapper;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (TSdsRecordDedtail)表服务实现类
 *
 * @author makejava
 * @since 2022-11-01 14:06:12
 */
@Service
public class TSdsRecordDedtailServiceImpl implements TSdsRecordDedtailService {
   @Autowired
   private TSdsRecordDedtailMapper mapper;

   @Override
   public boolean insertBatch(List<TSdsRecordDedtail> details) {
      int i=0;
      for (TSdsRecordDedtail detail : details) {
         i+=mapper.insert(detail);
      }
      return details.size()==i;
   }
   @Override
   public boolean selectByTid(Integer tid) {
      TSdsRecordDedtail tSdsRecordDedtail = new TSdsRecordDedtail();
      tSdsRecordDedtail.setSdsno(tid);
      List<TSdsRecordDedtail> select = mapper.select(tSdsRecordDedtail);
      if (select.size()>0){
         return true;
      }
      return false;
   }

   }


